package licode.unisop.platform.client.authinfo;

import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class AuPlatform {
    private String id;
    private String token;
    private String name;
    private String ticketUrl;
    private String userShare;
    private Integer state;
    private int expiredTime;
    private int currVersion;

    private AuPlatformProp plProps;

    private Map<String, AuRoleInfo> roleIds;
    private Map<String, List<AuRoleInfo>> roleGrp;
    private Map<String, AuPermitInfo> permitCodes;
    private Map<String, List<AuPermitInfo>> permitGrp;
    private Map<String, AuRoleInfo> roleByCodes;

    private Map<String, Object> configs;
    private Map<String, AuPlatSubAuth> subAuth;

    public AuPlatform() {
        expiredTime = 120;
        currVersion = 0;
        plProps = new AuPlatformProp();
    }

    public void updateVersion() {
        currVersion += 1;
    }
}
